import { BaseModel } from './../service/base.service';
import { formItemType, FormItemType } from '../form-helper';

export interface WebSiteConfigKeys { 
    name: string;
    description: string;
    header: string;
    footer: string;
    copyright: string;
}

export class WebSiteConfig extends BaseModel { 
    public key: keyof WebSiteConfigKeys = 'name';
    public name: string = '网站名称';
    public value: string = 'pigcms';
}

export class WebSiteDomain extends BaseModel { 
    @formItemType("网站名称")
    public name: string = 'pigcms';
    @formItemType("网站描述", FormItemType.TEXTAREA)
    public description: string = 'pigcms最好用的nodejs cms,好用且快！';
    @formItemType("头部嵌入", FormItemType.TEXTAREA, "这里可以防止活动代码")
    public header: string = '<script></script>';
    @formItemType("尾部嵌入", FormItemType.TEXTAREA, "这里可以放置统计代码")
    public footer: string = '<script></script>';
    @formItemType("版权信息")
    public copyright: string = '@copyright pigcms版权所有 2019-' + new Date().getFullYear();
}